//
//  TabBarOccupyingController.m
//  EducationAdminClient
//
//  Created by kwsdzjx on 15/12/3.
//  Copyright © 2015年 周佳兴. All rights reserved.
//

#import "TabBarOccupyingController.h"

@implementation TabBarOccupyingController
-(void)viewDidLoad{
    [super viewDidLoad];
    [self createRightNav];
}

-(void)createRightNav{
    UIButton *rightNavBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    rightNavBtn.frame = CGRectMake(0, 0, 11, 37/2);
    [rightNavBtn setBackgroundImage:[UIImage imageNamed:@"形状1-19-拷贝-4"] forState:UIControlStateNormal];
    [rightNavBtn addTarget:self action:@selector(rightClick:) forControlEvents:UIControlEventTouchUpInside];
//    UIBarButtonItem *item = [[UIBarButtonItem alloc]initWithCustomView:rightNavBtn];
//    self.navigationItem.rightBarButtonItem = item;
    UIImage *im = [UIImage imageNamed:@"没有权限_"];
    UIImageView *iv = [[UIImageView alloc] initWithImage:im];
    iv.center = CGPointMake(self.view.center.x, iv.center.y+20);
    [self.view addSubview:iv];

}

-(void)rightClick:(UIButton *)btn{
    NSNotificationCenter *noti = [NSNotificationCenter defaultCenter];
    saveLoginState(NLOGSTATE);
    [noti postNotificationName:@"login" object:@"exit"];

}
@end
